#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2017/3/20 13:57
# @Author  : 柳晓飞
# @Site    : 
# @File    : gameserver.py
# @Software: PyCharm
import countTime
import player
import handle.gameServerHand as gamesh
import  net.websocket as wb
import tableManager
import config.config as config

class GameServer:
    def __init__(self):
        pass

        # for i in range(0,2):
        #     playerID = 100001+i
        #     status = self.tableManager.leaveTable(playerID)
        #     if True == status:
        #         print ('player %d leave success'%(playerID))
        #     else:
        #         print ('player %d leave faild' % (playerID))
    def customInit(self):
        self.config = config.Config()
        self.gameServerHand= gamesh.GameServerHand()
        self.tableManager = tableManager.TableManager()
        self.tableManager.customInit()

        # test
        # for i in range(0,2):
        #     p = player.Player(100001+i)
        #     tableID = self.tableManager.enterTable(p, None)


    def startWSServer(self,host,port):
        #countTime.startTick()
        self.jjWebSocket = wb.JjWebSocket(host, port)



